﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Simple.Repository.Models.Market;
using Simple.Repository.Models.MorningCheck;
using Simple.Services.System.Market.Models;

namespace Simple.Services.System.MorningCheck.Models
{

    public class MCheckRecordViewModel
    {
        /// <summary>
        /// 没有晨检人数
        /// </summary>
        public int NoCheckCount { get; set; }

        /// <summary>
        /// 不正常人数
        /// </summary>
        public int AbnormalCount { get; set; }

        public List<MCheckRecordModel> CheckList { get; set; }
    }

    public class MCheckRecordModel : ModelBase
    {
        /// <summary>
        /// 记录主键Id
        /// </summary>
        public Guid? Id { get; set; } = null;

        /// <summary>
        /// 学生Id
        /// </summary>
        public Guid ChildrenId { get; set; }

        /// <summary>
        /// 学生姓名
        /// </summary>
        public string? ChildrenName { get; set; }

        /// <summary>
        /// 体温
        /// </summary>
        public decimal? BodyTemperature { get; set; }

        /// <summary>
        /// 咽喉类型
        /// </summary>
        public ThroatTypeEnum ThroatType { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        public string? Age { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [Required(ErrorMessage = "性别不能为空")]
        public GenderType Gender { get; set; }

        /// <summary>
        /// 所在班级
        /// </summary>
        public Guid? ClassesId { get; set; }

        /// <summary>
        /// 所在班级
        /// </summary>
        public string? ClassName { get; set; }

        /// <summary>
        /// 记录时间
        /// </summary>
        public string RecordTime { get; set; }

        /// <summary>
        /// 晨检是否通过
        /// </summary>
        public bool IsSuccess { get; set; }


        public override void ConfigureMapper(Profile profile)
        {
            profile.CreateMap<MCheckRecord, MCheckRecordModel>();
            profile.CreateMap<MCheckRecordModel, MCheckRecord>();
        }

    }


    public class MCheckRecordCreateOrUpdateModel : ModelBase
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        public Guid? Id { get; set; } = null;

        /// <summary>
        /// 学生Id
        /// </summary>
        public Guid ChildrenId { get; set; }

        /// <summary>
        /// 体温
        /// </summary>
        public decimal BodyTemperature { get; set; }

        /// <summary>
        /// 咽喉类型
        /// </summary>
        public ThroatTypeEnum ThroatType { get; set; } = ThroatTypeEnum.Normal;

        public override void ConfigureMapper(Profile profile)
        {
            profile.CreateMap<MCheckRecord, MCheckRecordCreateOrUpdateModel>();
            profile.CreateMap<MCheckRecordCreateOrUpdateModel, MCheckRecord>();
        }
    }

    public class MCheckRecordMobileModel
    {
        /// <summary>
        /// 记录主键Id
        /// </summary>
        public Guid? Id { get; set; } = null;

        /// <summary>
        /// 记录日期
        /// </summary>
        public string RecordTime { get; set; } = "";

        /// <summary>
        /// 体温
        /// </summary>
        public decimal? BodyTemperature { get; set; }

        /// <summary>
        /// 咽喉类型
        /// </summary>
        public ThroatTypeEnum ThroatType { get; set; } = ThroatTypeEnum.Normal;

        /// <summary>
        /// 晨检是否通过
        /// </summary>
        public bool IsSuccess { get; set; }

    }

}
